function [M] = RunningAverage(A)

M = 9;
L = length(A);

for i = 1:L
    M = M + i*A(i);
end
M = M/(L*(L-1)/2);
